package com.erpx.api.stock;
import com.erpx.api.CommonConstants;
import com.erpx.api.WdtClient;
import com.erpx.api.CommonConstants;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;

/**
 * 创建库存盘点单接口
 */
public class CreateStockPdService {

    public static void createPd() throws Exception {
        WdtClient client = new WdtClient(CommonConstants.sid, CommonConstants.appkey, CommonConstants.appSecret, CommonConstants.baseUrl);

        Map<String, String> params = new HashMap<String, String>();

        params.put("goods_list", "[{\"spec_no\":5,\"stock_num\":10}]");

        params.put("api_outer_no", "A000011117");
        params.put("is_check", "1");
        params.put("warehouse_id", "3");
        //        params.put("",);
        //        params.put("",);
        //        params.put("",);
        //        params.put("",);
        //        params.put("",);
        //        params.put("",);
        //        params.put("",);

        try {
            String response = client.execute("stock_sync_by_pd.php", params);
            System.out.println(response);
        } catch (IOException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
    }
}
